from bge import logic
import Tools
import bpy


def Camera():

    cont = logic.getCurrentController()
    obj = cont.owner
    sce = logic.getCurrentScene()
    
    def Init():
        
        if not 'init' in obj:
            
            NbZombie = bpy.context.scene.NbZombie
            NbHuman = bpy.context.scene.NbHuman
            
            NbHumanMark = bpy.context.scene.NbHumanMark
            NbZombieMark = bpy.context.scene.NbZombieMark
            
            Tools.InitMouse()
            
            obj['init'] = 1
            #obj['target'] = sce.objects['Control']
            #logic.player = sce.objects['Control']            
            #logic.exit = sce.objects['Exit']
            #obj['depth'] = obj.position.y - obj['target'].position.y
            Tools.GeneratePopulation(NbHuman,"human", NbHumanMark)
            Tools.GeneratePopulation(NbZombie,"zombie", NbZombieMark)
                
    Init()